<!--
 * @Author: 陈俊升 761723995@qq.com
 * @Date: 2023-05-11 08:47:22
 * @LastEditors: 陈俊升 761723995@qq.com
 * @LastEditTime: 2023-12-15 13:40:30
 * @FilePath: /hr_new_vue3/src/views/Management/Organization/PositionManagement/SystemManagement/Components/Management/Components/MainSide/FileDetail/index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 职位详情 -->
<template>
  <ContentCard>
    <template #header>
      <PageHeaderNew
        :title="title"
        :breadCrumb="breadCrumb"
        showBack
        @back="back"
        emitBack
      >
      </PageHeaderNew>
    </template>
    <div class="wrap">
      <Left></Left>
      <Main
        :style="{
          flex: 1
        }"
      ></Main>
    </div>
  </ContentCard>
</template>

<script lang="ts" setup>
import { GetOrganizationListDetail } from '@/apis/management/organization/organizationManagement';
import Left from './Components/Left/index.vue';
import Main from './Components/Main/index.vue';

const title = '职位档案详情';

const breadCrumb: string[] = [
  '组织',
  '职位管理',
  '职位体系管理',
  '职位档案详情'
];

// const route = useRoute();
const router = useRouter();

// let id = Number(route.query.id);
// onBeforeRouteUpdate((to) => {
//   id = Number(to.query.id);
//   getData();
// });

// const getData = async () => {
//   try {
//     await GetOrganizationListDetail({
//       id
//     });
//   } catch (error: unknown) {
//     console.log(error);
//   }
// };
// getData();

const back = () => {
  router.push({
    name: 'SystemManagement'
  });
};
</script>

<style lang="less" scoped>
.wrap {
  display: flex;
}
</style>
